package com.yc.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yc.bean.TestQuestion;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TestQuestionDao extends BaseMapper<TestQuestion> {
    
    /**
     * 根据测评ID查询题目列表，按顺序排序
     */
    @Select("SELECT * FROM testQuestions WHERE testId = #{testId} ORDER BY sortOrder ASC")
    List<TestQuestion> selectByTestId(@Param("testId") Long testId);
} 